Optimize MiniMax Music 3 inference on Apple Silicon - #294
Merged
Conversation
a-github-name
marked this pull request as ready for review
August 14, 2026 09:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
reference,optimized,q8, andq4performance modes; optimized BF16 remains the default and Q8/Q4 quantize only the autoregressive language/depth stack--minimum-duration/--min-framescontrols plus matching speech API fields and schema-3 recipe metadataWhy
The released graph preserved upstream behavior but left substantial Apple Silicon performance unused:
duration * 25could decode slightly short because the vocoder emits whole hopsThe reference path retains the released operation ordering for exact recovery and A/B work.
Measured impact
Matched 250-frame, 30-step staged runs on an M4 Max:
Installed-checkpoint semantic-logit gates:
A strict 180-second Q8 render completed in 1,413.81 seconds, used 4.50 GB maximum resident memory, and decoded to 180.268 seconds. A strict 60-second render decoded to 60.105 seconds.
The finished
referencepath produced a byte-identical 250-frame PCM24 render against clean 0.37.0: SHA-2566aee35f704ae5621f3bbc9b4b2ec04080931f8ec4a7db1e9099cf4ac4aaf5890.Whole-flow compilation, flow-weight quantization, and serial CFG were benchmarked and rejected because they regressed end-to-end performance. Flow therefore remains BF16.
Validation
./scripts/check.shafter rebasing onto currentorigin/mainmere.runproduct build: passed